<template>
	<view class="padb20">
		<cu-custom bgColor="bg-gradual-blue" isBack="true">
			<block slot="content">订单详情</block>
		</cu-custom>
		<view class="pad2 bcf" v-if="$com.isTrue(info)">
			<view class="list-style-1 martb3 fs14 fwb">{{info.info}}</view>
			<view class="flrc padtb2 bdtda"><view class="flex1">订单编号</view><view>{{info.sn}}</view></view>
			<view class="flrc padtb2"><view class="flex1">订单金额</view><view>{{info.num}}</view></view>
			<view class="flrc padtb2"><view class="flex1">下单时间</view><view>{{$com.str2time(info.createAt)}}</view></view>
			<view class="flrc padtb2"><view class="flex1">开始生产</view><view>{{$com.str2time(info.startAt)}}</view></view>
			<view class="flrc padtb2"><view class="flex1">订单完成</view><view>{{$com.str2time(info.finishAt)}}</view></view>
			<view class="flrc padtb2"><view class="flex1">业务员</view><view>{{info.createBy.name}}</view></view>
			<view class="flrc padtb5 bdtso"><view class="flex1 list-style-1">订单状态</view><view>
				<view class=" tar padlr3 padtb2 round1 bdso" style="" :style="'background-color: ' + info.status.background + ';color: ' + info.status.color + ';'">
					{{info.status.name}}
				</view>
			</view></view>
			<view class="bdtso padb2"> 
				<view class="list-style-2 martb3">备注信息</view>
				<view>{{info.tips}}</view>
			</view>
			<view class="bdtso"> 
				<view class="list-style-2 martb3">设计图</view>
				<image class="w100"  @tap="viewPic($api.getAssetBaseUrl() + info.cover,[$api.getAssetBaseUrl() + info.cover])" 
				:src="$api.getAssetBaseUrl() + info.cover" mode="widthFix"></image>
			</view>
			<view class="bdtso"> 
				<view class="list-style-2 martb3">附件</view>
				<image v-for="(pic,index) in info.pics" class="w100" 
				  @tap="viewPic($api.getAssetBaseUrl() + pic,[$api.getAssetBaseUrl() + pic])" 
				:src="$api.getAssetBaseUrl() + pic" mode="widthFix"></image>
			</view>
		</view>
	<!-- 	<view class="pos-f b0 l0 r0  bcf flrc fs12">
			<view class="bg-black tac flex1 pad3 ripple"><text class="fa fa-trash padr3"></text>删除</view>
			<view class="bg-orange tac flex1 pad3 ripple" @tap="$win.navto" data-url='/pages/stream/createOrder/createOrder' :data-id="info.id"><text class="fa fa-edit padr3"></text>编辑</view>
		</view> -->
	</view>
</template>

<script>
	import api from '../../../static/js/api.js'
	import com from '../../../static/js/com.js'
	import win from '../../../static/js/win.js'
	import list from '../../../static/js/list.js'
	export default {
		data() {
			return {
				info : false
			}
		},
		methods: {
			
		},
		onLoad(option) {
				console.log(option)
			let id = option.id
			api.get("/api/streamOrders/" + id,{},(res)=>{
				this.info = res.d
				console.log(res)
			})
		}
	}
</script>

<style>

</style>
